package icu.thatyear.main.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户配送地址
 * </p>
 *
 * @author Cjy
 * @since 2024-12-06
 */
@Getter
@Setter
@TableName("tz_user_addr")
@Schema(name = "TzUserAddr", description = "用户配送地址")
public class TzUserAddr implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "ID")
    @TableId(value = "addr_id", type = IdType.AUTO)
    private Long addrId;

    @Schema(description = "用户ID")
    @TableField("user_id")
    private String userId;

    @Schema(description = "收货人")
    @TableField("receiver")
    private String receiver;

    @Schema(description = "省ID")
    @TableField("province_id")
    private Long provinceId;

    @Schema(description = "省")
    @TableField("province")
    private String province;

    @Schema(description = "城市")
    @TableField("city")
    private String city;

    @Schema(description = "城市ID")
    @TableField("city_id")
    private Long cityId;

    @Schema(description = "区")
    @TableField("area")
    private String area;

    @Schema(description = "区ID")
    @TableField("area_id")
    private Long areaId;

    @Schema(description = "邮编")
    @TableField("post_code")
    private String postCode;

    @Schema(description = "地址")
    @TableField("addr")
    private String addr;

    @Schema(description = "手机")
    @TableField("mobile")
    private String mobile;

    @Schema(description = "状态,1正常，0无效")
    @TableField("status")
    private Integer status;

    @Schema(description = "是否默认地址 1是")
    @TableField("common_addr")
    private Integer commonAddr;

    @Schema(description = "建立时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @Schema(description = "版本号")
    @TableField("version")
    private Integer version;

    @Schema(description = "更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;
}
